package com.example.demo.mapper;

import com.example.demo.entity.Idea;
import com.example.demo.entity.Open;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OpenMapper {
    @Select("SELECT * FROM OPEN WHERE OPENID=#{openid}")
    public Open findOpenid(String openid);

    @Insert("INSERT INTO Open(openid,openname,indroduction,studentid,age,studentname,sex,height,course,grade)" +
            "values(#{openid},#{openname},#{indroduction},#{studentid},#{age},#{studentname},#{sex},#{height},#{course},#{grade})")
    public int InsertOpen(Open open);
}
